package cn.zane.lottery.domain.strategy.model.response;

import cn.zane.lottery.common.constant.Constants;
import cn.zane.lottery.domain.strategy.model.vo.DrawAwardInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DrawResult {

    /**
     * 用户ID
     */
    private String uId;

    /**
     * 策略ID
     */
    private Long strategyId;

    /**
     * 中奖状态：0未中奖、1已中奖、2兜底奖 Constants.DrawState
     */
    private Integer drawState = Constants.DrawState.FAIL.getCode();

    /**
     * 中奖奖品信息
     */
    private DrawAwardInfo drawAwardInfo;


    public DrawResult(Integer userId, Long strategyId, Integer code) {
        this.uId = String.valueOf(userId);
        this.strategyId = strategyId;
        this.drawState = code;
    }

    public DrawResult(Integer userId, Long strategyId, Integer code, DrawAwardInfo drawAwardInfo) {
        this.uId = String.valueOf(userId);
        this.strategyId = strategyId;
        this.drawState = code;
        this.drawAwardInfo = drawAwardInfo;
    }
}
